<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.6.0.min.js"></script>
    <style>
        #demo {
            position: relative;
            width: 100px;
            height: 100px;
            background: pink;
        }
    </style>
</head>

<body>
    <div id="demo">内容</div>
    <script>
        $(function() {
            $("#demo").animate({
                "left": "300px",
                "width": "500px",
                "height": "500px",
                "font-size": "36px",
                // "background": "red"  不能改变
            })
        })
    </script>
</body>

</html>